/**
 * 
 */
package edu.umd.clip.lm.factors;

/**
 * @author Denis Filimonov <den@cs.umd.edu>
 *
 */
public class SnowballEnglishSuffixLimited extends SnowballEnglishSuffix {
	private final int limit;
	/**
	 * 
	 */
	public SnowballEnglishSuffixLimited() {
		super();
		this.limit = 4;
	}
	@Override
	public String wordToOvertFactor(String word) {
		String suffix = super.wordToOvertFactor(word);
		if (suffix.length() > limit) {
			suffix = suffix.substring(suffix.length()-limit);
		}
		return suffix;
	}

}
